<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>环境光</title>
    <script src="./js/Three.js"></script>
</head>
<body>

</body>
<script>

    var scene = new THREE.Scene();
    // var camera = new THREE.OrthographicCamera(-5, 5, 3.75, -3.75, 0.1, 100);
    var camera = new THREE.PerspectiveCamera(60, 500/400,1,10);
    camera.position.set(0,0,5);
    camera.lookAt(new THREE.Vector3(0, 0, 0));
    scene.add(camera)

    var renderer = new THREE.WebGLRenderer();
    renderer.setSize(500, 400);

    document.body.appendChild(renderer.domElement);

    // var light = new THREE.AmbientLight('#0xFFFF00');
    // scene.add(light);

    var greenCube = new THREE.Mesh(new THREE.CubeGeometry(2, 2, 2),
        new THREE.MeshPhongMaterial({
            color: 0xFFFF00, // ye
            shininess : 50,
            specular : 0xFF0000 // red
        }));
    // greenCube.position.x = 3;
    scene.add(greenCube);

    renderer.render(scene, camera);


</script>
</html>